Skip to content

Show all ACP runtimes with install status and one-click install#724

Merged
wpfleger96 merged 16 commits into
mainfrom
wpfleger/runtime-reconciliation-install-ux
May 23, 2026
Merged

Show all ACP runtimes with install status and one-click install#724
wpfleger96 merged 16 commits into
mainfrom
wpfleger/runtime-reconciliation-install-ux

Conversation

@wpfleger96
Copy link
Copy Markdown
Collaborator

@wpfleger96 wpfleger96 commented May 22, 2026

discover_local_acp_providers() silently filtered out any runtime whose ACP adapter binary wasn't on disk, hiding Claude Code and Codex even when the user had the underlying CLI installed. There was no indication these runtimes existed or how to enable them.

  • Add four-state availability classification (Available / AdapterMissing / CliMissing / NotInstalled) to a consolidated discover_acp_providers() that returns all known runtimes regardless of install state
  • Add install_acp_runtime Tauri command with two-phase install (CLI then adapter), login shell execution, stdin(Stdio::null()) to prevent interactive prompts from hanging, 5-minute timeout with PID-based SIGTERM, and per-provider concurrency guard via Mutex<HashSet<String>>
  • Clear the binary resolve cache on every discover_acp_providers call so the Re-run button in Doctor actually re-probes the filesystem
  • Split static install_hint into cli_install_hint and adapter_install_hint per provider; compose the appropriate hint dynamically in discover_acp_providers() based on availability state
  • Redesign Doctor settings panel: section header "Agent CLIs and ACP runtimes", show both CLI and adapter paths for providers with separate adapters (Claude Code, Codex), "ACP support built-in" note for native providers (Goose, Sprout Agent), status icons and Install/View instructions buttons for all four states
  • Use openUrl() from @tauri-apps/plugin-opener for external links (Tauri silently swallows window.open() and <a target="_blank">)
  • Use official install scripts for CLI binaries: Goose (download_cli.sh), Claude Code (claude.ai/install.sh), Codex (chatgpt.com/codex/install.sh); npm for ACP adapters (@agentclientprotocol/claude-agent-acp, @zed-industries/codex-acp)
  • Correct provider metadata: Goose underlying_cli set to "goose" with install in cli_install_commands (native ACP, no adapter), Codex docs link to zed-industries/codex-acp, Claude Code adapter @agentclientprotocol/claude-agent-acp
  • Strip hermit env vars (NPM_CONFIG_PREFIX, NPM_CONFIG_CACHE, COREPACK_HOME) in install subprocesses so npm uses the user's normal registry
  • Show all runtimes in the Persona dialog dropdown with availability labels (adapter missing / CLI missing / not installed) and a contextual warning when an unavailable provider is selected
  • Redefine AcpProvider as a narrowed intersection type of AcpProviderCatalogEntry with useAvailableAcpProviders() hook for callers that need non-null command/binaryPath, preserving ChannelAgentProvider and all downstream callers unchanged
  • Extract pure classify_provider() with 5 unit tests covering all four states plus the no-underlying-CLI path; consolidated E2E bridge mocks with configurable overrides

Replaces #715 (branch rename).

@wpfleger96 wpfleger96 requested a review from a team as a code owner May 22, 2026 16:25
@wpfleger96 wpfleger96 force-pushed the wpfleger/runtime-reconciliation-install-ux branch from ab8ef0c to 2387b97 Compare May 22, 2026 21:15
…buttons

The "Preferred runtime" dropdown in Agents > Add Persona and the Doctor
panel only showed runtimes with a resolved ACP adapter binary, silently
hiding Claude Code and Codex when their adapters weren't installed.

Add three-state availability detection (Available / AdapterMissing /
NotInstalled) to distinguish "CLI present but adapter missing" from
"nothing installed." Expose a full provider catalog via
`discover_all_acp_providers` and an `install_acp_runtime` command that
runs server-defined install scripts in a login shell with a 5-minute
timeout.

Doctor panel now shows all four known runtimes with status badges and
Install buttons. PersonaDialog shows all runtimes with status labels so
users can store a preference for later. CreateAgentDialog shows a hint
when additional runtimes are available to install.
…iew findings

The original implementation created a second parallel Tauri command
(discover_all_acp_providers) alongside the existing one to avoid
changing the return type. This produced two commands, two hooks, two
query keys, and two raw type converters. Consolidates into a single
command returning the full catalog, with a useAvailableAcpProviders
hook that type-narrows for callers needing non-null command/binaryPath.

Also fixes: pipe deadlock in install command (#1), UTF-8 truncation
panic (#2/#4), adds install concurrency guard (#11), exact provider ID
match (#15), error display stdout fallback (#5), success banner
suppression when already available (#12), misleading re-run text (#13),
IIFE refactor in PersonaDialog (#14), hidden internal query lift (#7),
configurable e2e mocks (#9), shared raw type exports (#8), and
classify_provider unit tests (#10).
…olidation

Fix CI-breaking missing `AcpAvailabilityStatus` import in tauri.ts,
eliminate zombie process leak on install timeout by saving PID before
thread move and sending SIGTERM, remove duplicate Map keys in
check-file-sizes.mjs that silently shadowed earlier entries, clean up
dead `MockAcpProvider` type from e2eBridge, and add missing
`classify_provider` test for the no-underlying-CLI code path.
…Catalog field

The onboarding E2E test passed `{ acpProviders: [] }` to the mock
bridge, but the bridge handler was renamed to read
`acpProvidersCatalog` during consolidation. The stale field name was
silently ignored, causing the default catalog (with available
providers) to be returned instead of an empty list.
…rmit env leak

Replace window.open() with <a target="_blank"> for "View instructions"
links — Tauri blocks window.open but handles anchor tags correctly.

Fix Claude Code adapter install command: the package is
@agentclientprotocol/claude-agent-acp (not @anthropic-ai/claude-agent-acp
which doesn't exist on npm).

Strip NPM_CONFIG_PREFIX, NPM_CONFIG_CACHE, and COREPACK_HOME from the
install subprocess environment so npm uses the user's normal registry
rather than inheriting hermit's project-local Artifactory proxy config.
@wpfleger96 wpfleger96 force-pushed the wpfleger/runtime-reconciliation-install-ux branch from eea5054 to f1821bc Compare May 22, 2026 21:31
wpfleger96 added 11 commits May 22, 2026 17:35
Tauri does not open external URLs via <a target="_blank"> — the click
is silently swallowed. Use openUrl() from @tauri-apps/plugin-opener
which correctly dispatches to the system default browser.
Goose has native ACP support (no separate adapter), so the install
script belongs in cli_install_commands, not adapter_install_commands.
Also sets underlying_cli to "goose" since the CLI binary exists.

Codex ACP adapter is available on npm as @zed-industries/codex-acp —
enable auto-install and point docs link to the actual adapter repo
instead of the main Codex repo.
…, dynamic install hints

Re-run button now clears the binary resolve cache so it actually
re-probes the filesystem instead of returning stale cached results.

Replace global AtomicBool install guard with per-provider
Mutex<HashSet<String>> so concurrent installs for different providers
(e.g. claude + codex) can proceed in parallel.

Add codex CLI install command (npm install -g @openai/codex) so
clicking Install when both CLI and adapter are missing installs both.

Compute install_hint dynamically based on availability state so the
UI accurately describes what the Install button will do.
When the ACP adapter binary is found but the underlying CLI is missing
(e.g. codex-acp installed without codex), classify_provider now returns
CliMissing instead of Available. The adapter can't function without the
CLI, so Doctor shows an amber warning with an Install button that will
set up the missing CLI.
@openai/codex on npm uses platform-specific sub-packages and the latest
alpha publishes only a win32-x64 variant, causing EBADPLATFORM on macOS.
Switch to the official install script which handles platform detection.
Claude Code is now a Rust binary with platform-specific npm packaging.
Their docs recommend the native install script over npm. Switch to
curl -fsSL https://claude.ai/install.sh | bash.
…er_install_hint

The single install_hint field was semantically ambiguous — it referred
to the CLI for some providers and the adapter for others. Split into
two fields so each provider clearly describes both install steps. The
dynamic hint composition in discover_acp_providers selects the right
hint based on availability state: CliMissing shows the CLI hint,
AdapterMissing shows the adapter hint, NotInstalled shows both.
Rename section header to "Agent CLIs and ACP runtimes" with a
descriptive subheader. Show both CLI and ACP adapter paths when a
provider has a separate adapter (Claude Code, Codex). Add "ACP support
built-in" note for providers with native ACP (Goose, Sprout Agent).
…tive hangs

Install commands like the Codex CLI script prompt "Start Codex now?
[y/N]" which blocks forever when the subprocess inherits stdin from
the Tauri process. Redirect stdin from /dev/null so any interactive
prompt gets an immediate EOF and defaults to its non-interactive
behavior.
Install scripts like Codex's install.sh explicitly open /dev/tty to
prompt interactively ("Start Codex now? [y/N]"), bypassing our
stdin(Stdio::null()). Call setsid() in pre_exec to create a new
session without a controlling terminal, forcing the script's fallback
to read from stdin (/dev/null → EOF → default answer).
@wpfleger96 wpfleger96 merged commit 4269fd2 into main May 23, 2026
15 checks passed
@wpfleger96 wpfleger96 deleted the wpfleger/runtime-reconciliation-install-ux branch May 23, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants